<template>
  <div class="fullscreen-modal-overlay" @click="closeModal">
    <div class="fullscreen-modal-content" @click.stop>
      <slot />
      <button @click="closeModal">Close</button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    }
  },
  emits: ['close'],
  methods: {
    closeModal() {
      this.$emit('close')
    }
  }
}
</script>

<style scoped>
.fullscreen-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* 确保弹窗在其他内容之上 */
}

.fullscreen-modal-content {
  width: 100%;
  height: 100%;
  background-color: white;
  overflow: auto; /* 如果内容超出屏幕，可以滚动 */
  padding: 20px;
  box-sizing: border-box;
}
</style>
